home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group97a.txt
/
000067_icon-group-sender _Tue Mar 4 11:37:26 1997.msg
< prev
next >
Wrap
Internet Message Format
|
2000-09-20
|
4KB
Received: by cheltenham.cs.arizona.edu; Tue, 4 Mar 1997 14:44:03 MST
Message-Id: <199703041635.AA27705@optima.cs.arizona.edu>
X-Sender: lindsay@mail.rmc.ca
X-Mailer: Windows Eudora Light Version 1.5.2
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Date: Tue, 04 Mar 1997 11:37:26 -0500
To: gep2@computek.net, icon-group@cs.arizona.edu
From: "John H. Lindsay" <lindsay_j@rmc.ca>
Subject: Re: Icon and two-dimensional matching
Errors-To: icon-group-errors@cs.arizona.edu
Status: RO
Content-Length: 3630
At 15:49 1997 03 03 -0600, you wrote:
>Interesting article, however:
>
>>Icon and SNOBOL emphasize handling values rather than references
>although there are 'name' operators, and don't handle sub-arrays,
>substrings or sublists as pseudovariables.
>
>SNOBOL4 absolutely DOES support substrings as a pseudovariable, as long as the
>substring in question it the portion of the subject string that you're
matching.
> This, in fact, is the basis for ALL pattern matching in SNOBOL4!
No, at least not in the sense that I'm speaking about. Yes, it's possible
to replace a substring (assign to it) in the middle of a string, thus making
a string replacement statement a form of assignment. But that alone
does not make a substring, either identified through pattern matching
or using SUBSTR into a pseudovariable; one can't form the NAME of any
sort of expression including a substring -- that's reserved to variables -- to
pass it as an argument IN SITU to a called function for example. Passing
cross-sections of arrays to a routine is a bit more interesting in Algol 68
than in PL/I; in the latter, with the * as a sort of subscript meaning
'all the
subscript values in this dimension' or with the once-proposed subrange
notation, the range of the subscripts for the cross-section argument and
corresponding parameter are inherited from those of the host array, but in
Algol 68, the range of subscripts of the slice defaults to from 1 to the
number of elements in that dimension of the slice or may be specified as
starting at any integer value as an optional part of the 'trimscript' that
selects the slice from the host array. In these cases, it can be recognized
that the slice (pseudovariable), while sharing storage with the host, is an
array in its own right.
>>I'm interested in generalized macro processing, where the macro
>processing becomes a method - a dynamic method - of program
>language development, and that plays just as much a part in program
>development as algorithm design, module design and data structure
>design. One specifies the TRANSLATION of algorithms, data
>specifications, ... into code. Previous passes over the text or previous
>work in the same pass where rescanning is allowed, besides perhaps
>transforming the text, may decorate it with tokens (roughtly, a structure
>containing a source string and other information), or with trees or with
>other structures and with other information. Then one has to recognize
>patterns among the tag-along information and source text, and to
>process it both by generating new information and transforming the
>structures and data that exist.
>
>One of the shortcomings of Icon (compared with S-BOL), IMO, is that Icon
>supports neither EVAL() nor CODE(). Admittedly these are features that one
>doesn't use often in most S-BOL programs, but when you -do- need them, they
are
>absolutely indispensable!
Right !
>In the case in question, you could use the full features of S-BOL to modify
the
>program itself at source level, and to replace almost any desired part of it
>with an "enhanced" version during program execution... even in the middle of a
>statement!
Right, but I'm considering general macro processing, and trying to avoid fixing
it to any one language or compiler, even though for what I'm doing, there
has to
be a base language for the macro stuff.
>Gordon Peterson
>http://www.computek.net/public/gep2/
All the best !
John H. Lindsay, Assistant Professor,
DEPARTMENT OF MATHEMATICS AND COMPUTER SCIENCE
ROYAL MILITARY COLLEGE OF CANADA
PO BOX 17000 STN FORCES
KINGSTON ON K7K7B4